<template>
	<view class="pages-wapper ss-flex-col">
			<u-navbar
			           placeholder
			            fixed
			            :autoBack="true"
			        >
			        </u-navbar>
					<!-- #ifdef H5 -->
					<iframe :src="url" style="flex:1;border: none;margin: 0;padding: 0;" >
			
		</iframe>
					<!-- #endif -->
					<!-- #ifdef APP -->
					<web-view :src="url" style="flex: 1;" ></web-view>
					<!-- #endif -->
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:''
			};
		},
		onLoad({url}) {
			
			this.url=decodeURI(url)
		},
		methods:{
			$uGetRect(selector, all) {
				return new Promise((resolve) => {
					uni.createSelectorQuery()
						.in(this)[all ? 'selectAll' : 'select'](selector)
						.boundingClientRect((rect) => {
							if (all && Array.isArray(rect) && rect.length) {
								resolve(rect)
							}
							if (!all && rect) {
								resolve(rect)
							}
						})
						.exec()
				})
			}
		},
		async mounted() {
		
			
			
				let {
					height
				} = await this.$uGetRect(".header-content")
			
				this.headerheight = height
			
			
			
			
		}
	}
</script>

<style lang="scss" scoped>
.pages-wapper{
	height: 100vh; /*給 Safari 以外的瀏覽器讀取*/
	height: calc(var(--vh, 1vh) * 100);
}
.header-wapper {
		height: calc(var(--status-bar-height) + 33rpx + 95rpx);
		flex-shrink: 0;
	}

	.header-content {
		position: fixed;

		width: 100%;
		padding: 0 46rpx;
		padding-top: calc(var(--status-bar-height) + 33rpx);
		box-sizing: border-box;


		z-index: 999;

		.center-content {
			width: 326rpx;
		}

		image {
			width: 95rpx;

			height: 95rpx;
			background-color: #F3F3F3;
			border-radius: 50%;

		}
	}
</style>
